//
//  ThreePictureCell.m
//  口袋
//
//  Created by tiankun on 15/5/25.
//  Copyright (c) 2015年 口袋. All rights reserved.
//

#import "ThreePictureCell.h"
#import "DKNightVersion.h"

#define W  [UIScreen mainScreen].bounds.size.width
#define H  [UIScreen mainScreen].bounds.size.height *0.3
@implementation ThreePictureCell
- (void)dealloc
{
    [_firstImageView release];
    [_secondImageView release];
    [_thirdImageView release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.firstImageView = [[UIImageView alloc]initWithFrame:CGRectMake(5, 5, W * 0.6, H * 0.9)];
        [self.firstImageView setBackgroundColor:[UIColor orangeColor]];
        [self.contentView addSubview:self.firstImageView];
        [self.firstImageView release];
        self.secondImageView = [[UIImageView alloc]initWithFrame:CGRectMake(W * 0.63, H * 0.5, W * 0.35, H  * 0.42)];
        [self.secondImageView setBackgroundColor:[UIColor orangeColor]];
        [self.contentView addSubview:self.secondImageView];
        [self.secondImageView release];
        self.thirdImageView = [[UIImageView alloc]initWithFrame:CGRectMake(W * 0.63, 5, W * 0.35, H * 0.42)];
        [self.thirdImageView setBackgroundColor:[UIColor orangeColor]];
        [self.contentView addSubview:self.thirdImageView];
        [self.thirdImageView release];
        self.title = [[UILabel alloc]initWithFrame:CGRectMake(5, H * 0.95, W, H * 0.14)];
        self.title.font = [UIFont boldSystemFontOfSize:18];
        self.title.nightTextColor = [UIColor lightGrayColor];
        [self.contentView addSubview:self.title];
        [self.title release];
        self.digest = [[UILabel alloc]initWithFrame:CGRectMake(5, H * 1.1, W, H * 0.28)];
        self.digest.nightTextColor = [UIColor lightGrayColor];
        self.digest.backgroundColor = [UIColor clearColor];
        [self.contentView addSubview:self.digest];
        [self.digest release];
        
        [DKNightVersionManager addClassToSet:self.class];
        self.nightBackgroundColor = UIColorFromRGB(0x343434);
    }
    return self;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
